gpsbabel.git
4 years agoUpdate tpo.cc (#643)
SRE-babel [Wed, 13 Oct 2021 15:13:03 +0000 (08:13 -0700)]
Update tpo.cc (#643)

Some .tpo file tracks were/are parsed such that wild jumps occur in lat/lon, creating invalid coords which were not caught by output routines. Some logic flaws and int size errors have been fixed, but some tracks still contain invalid points. Tracks not corrected by this patch now result in warning messages to STDOUT. Entirely valid tracks will also generate warnings if lat or lon changes by a full degree between adjacent track points (should never happen). Non-fatal warning allows manual removal of the few bad track points  in an output format like GPX. Damage is apparently limited to half a dozen incremental points before the next full point, but that can't be guaranteed.

Co-authored-by: tsteven4 <13596209+tsteven4@users.noreply.github.com>
4 years agodon't set gpsbabel::XmlStreamWriter codec in mapfactor (#733)
tsteven4 [Wed, 13 Oct 2021 13:17:09 +0000 (07:17 -0600)]
don't set gpsbabel::XmlStreamWriter codec in mapfactor (#733)

We use utf-8 by default as of #671.

4 years agoMerge pull request #732 from tsteven4/qtprep103
tsteven4 [Tue, 12 Oct 2021 22:10:16 +0000 (16:10 -0600)]
Merge pull request #732 from tsteven4/qtprep103

Qt 6 compatiblity changes

4 years agoavoid std::min with QString::size
tsteven4 [Tue, 12 Oct 2021 21:20:35 +0000 (15:20 -0600)]
avoid std::min with QString::size

missed one in previous commit.

4 years agodon't include QCharRef.
tsteven4 [Tue, 12 Oct 2021 18:56:55 +0000 (12:56 -0600)]
don't include QCharRef.

missed one in previous commit.

4 years agoMerge pull request #731 from tsteven4/qt6prep102
tsteven4 [Tue, 12 Oct 2021 18:50:48 +0000 (12:50 -0600)]
Merge pull request #731 from tsteven4/qt6prep102

compatible changes for Qt6

4 years agodon't include QByteRef.
tsteven4 [Tue, 12 Oct 2021 17:54:03 +0000 (11:54 -0600)]
don't include QByteRef.

It is gone in Qt6.  It was not documented as a class in Qt5.
In Qt5 QByteRef just included qbytearray.h.

4 years agodon't include QCharRef.
tsteven4 [Tue, 12 Oct 2021 17:53:04 +0000 (11:53 -0600)]
don't include QCharRef.

It is gone in Qt6.  It was a "helper class for QString".  It was not
documented as a class in Qt5.  In Qt5 QCharRef just included qstring.h.

4 years agodon't include QStaticStringData.
tsteven4 [Tue, 12 Oct 2021 16:57:14 +0000 (10:57 -0600)]
don't include QStaticStringData.

missed one in the previous commit.

4 years agoMerge pull request #730 from tsteven4/qt6prep101
tsteven4 [Tue, 12 Oct 2021 16:00:21 +0000 (10:00 -0600)]
Merge pull request #730 from tsteven4/qt6prep101

compatible changes for Qt6

4 years agoaccomodate the deletion of QDateTime::toTime_t in Qt6.
tsteven4 [Tue, 12 Oct 2021 15:12:43 +0000 (09:12 -0600)]
accomodate the deletion of QDateTime::toTime_t in Qt6.

4 years agodon't include QStaticStringData.
tsteven4 [Tue, 12 Oct 2021 13:22:24 +0000 (07:22 -0600)]
don't include QStaticStringData.

It goes away in Qt6.  Besides, the documented include is QString,
which in Qt 5 will include qstringliteral.h just as QStaticStringData
does.

4 years agoavoid std::min with QString::size, which
tsteven4 [Tue, 12 Oct 2021 13:18:55 +0000 (07:18 -0600)]
avoid std::min with QString::size, which

changes types in Qt6.

4 years agomigrate from QRegExp to QRegularExpression. (#729)
tsteven4 [Sun, 10 Oct 2021 21:54:44 +0000 (15:54 -0600)]
migrate from QRegExp to QRegularExpression. (#729)

4 years agocompatible fixes for qt6 warnings and conflicts. (#728)
tsteven4 [Mon, 4 Oct 2021 19:17:19 +0000 (13:17 -0600)]
compatible fixes for qt6 warnings and conflicts. (#728)

* quite qt6 yammering about foreach.

* avoid name collision with Qt6.

* fix warning: type qualifiers ignored on cast result type

4 years agoDon't use Qt module names in include directives. (#727)
tsteven4 [Mon, 4 Oct 2021 17:21:42 +0000 (11:21 -0600)]
Don't use Qt module names in include directives. (#727)

This simplifies migration to Qt6 where some classes moved.

This was done mostly by an ed script, although mkstyle.sh took some
hand holding.

1,$g/#include <QtCore\// s/<QtCore\/\([^>]*\)>/<\1>       /
1,$g/#include <QtGui\// s/<QtGui\/\([^>]*\)>/<\1>      /
1,$g/#include <QtNetwork\// s/<QtNetwork\/\([^>]*\)>/<\1>          /
1,$g/#include <QtWidgets\// s/<QtWidgets\/\([^>]*\)>/<\1>          /
1,$g/ *$/ s/ *$//
w
q

4 years agomore qstringview work for qt6. (#726)
tsteven4 [Wed, 29 Sep 2021 15:46:00 +0000 (09:46 -0600)]
more qstringview work for qt6. (#726)

4 years agoupdate gui/gpx.cc to use QStringView for Qt6. (#725)
tsteven4 [Tue, 28 Sep 2021 12:22:36 +0000 (06:22 -0600)]
update gui/gpx.cc to use QStringView for Qt6. (#725)

4 years agopass QStringViews by value, not const reference. (#724)
tsteven4 [Mon, 27 Sep 2021 19:56:00 +0000 (13:56 -0600)]
pass QStringViews by value, not const reference. (#724)

As recommended in the QStringView documentation.

4 years agofixes for #722, Mechanically remove QStringRef use for QStringView to help with Qt6...
tsteven4 [Mon, 27 Sep 2021 19:09:18 +0000 (13:09 -0600)]
fixes for #722, Mechanically remove QStringRef use for QStringView to help with Qt6. (#723)

* Fix typo in maggeo from search-and-replace work earlier.

* Revert startOfDate() calls to keep floor at 5.12.x to keep builders happy. :-/

* Explictly get QString from StringView in gpx for compat with older Qt builds.

Co-authored-by: Robert Lipe <robertlipe@gmail.com>
4 years agoMechanically remove QStringRef use for QStringView to help with Qt6. (#722)
GPSBabel [Wed, 22 Sep 2021 04:16:30 +0000 (23:16 -0500)]
Mechanically remove QStringRef use for QStringView to help with Qt6. (#722)

* Make more string literals encoded at UTF-16 (bloaty-bytes) to
reduce conversions.
* Favor QStringView(Qt6-ism that mirrors C++ standard std::stringview)
over QStringRef (Qt5 hack).

Co-authored-by: Robert Lipe <robertlipe@gmail.com>
4 years agodon't limit simplify count maximum in GUI (#721)
tsteven4 [Mon, 20 Sep 2021 16:18:40 +0000 (10:18 -0600)]
don't limit simplify count maximum in GUI (#721)

4 years agoRemove Bushnell and Bushnell_trl formats.
Robert Lipe [Mon, 13 Sep 2021 22:32:51 +0000 (17:32 -0500)]
Remove Bushnell and Bushnell_trl formats.
These were added in 2009 when Onix unit were on firesale at places like Woot
as Bushnell had just exited the handheld GPS space. There was a flurry of
activity by a low number of users, followed by years of silence beyond
maintenance burden.

4 years agofix map preview bug that dropped tracks with 2 pts. (#714)
tsteven4 [Wed, 19 May 2021 20:58:23 +0000 (14:58 -0600)]
fix map preview bug that dropped tracks with 2 pts. (#714)

4 years agoadd fedora 34 to CI (#713)
tsteven4 [Sun, 9 May 2021 18:34:42 +0000 (12:34 -0600)]
add fedora 34 to CI (#713)

4 years agoMinorfixes to "new" gtm_stringread() functions to eliminate leading and trailing...
Robert Lipe [Sat, 17 Apr 2021 01:15:29 +0000 (20:15 -0500)]
Minorfixes to "new" gtm_stringread() functions to eliminate leading and trailing spaces (#710)

* Trim more uses of C date and potentially unsafe memory practices.

* Add warning fixes for garmin_xt and exif

5 years agoMerge pull request #664 from GPSBabel/reaper
Robert Lipe [Thu, 15 Apr 2021 23:21:39 +0000 (18:21 -0500)]
Merge pull request #664 from GPSBabel/reaper

Remove dead formats: alan, an1, netstumbler, naviguide.

5 years agorestore lost format options when using positional parameters (#709)
tsteven4 [Tue, 13 Apr 2021 17:33:53 +0000 (11:33 -0600)]
restore lost format options when using positional parameters (#709)

* restore format options with positional parameters.

* fix positional test

5 years agoMerge pull request #707 from GPSBabel/pvs
tsteven4 [Mon, 29 Mar 2021 14:09:22 +0000 (08:09 -0600)]
Merge pull request #707 from GPSBabel/pvs

PVS-Studio fixes

5 years agoBring back some of the files I nuked and move them to deprecated/
Robert Lipe [Mon, 29 Mar 2021 03:54:54 +0000 (22:54 -0500)]
Bring back some of the files I nuked and move them to deprecated/

5 years agofix some format mismatches found by PVS-Studio
tsteven4 [Wed, 24 Mar 2021 14:16:24 +0000 (08:16 -0600)]
fix some format mismatches found by PVS-Studio

V576 Incorrect format. Consider checking the second actual argument of the 'asprintf' function. The SIGNED integer type argument is expected.

QString::asprintf is not recommended for new code anyway.

5 years agofix erroneous Qt translation caught by PVS studio.
tsteven4 [Tue, 23 Mar 2021 18:58:39 +0000 (12:58 -0600)]
fix erroneous Qt translation caught by PVS studio.

V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing.

This makes me wonder if this code is ever used.  If args == "OutputFromUnit"
it would throw a fatal error since b9cdbe4e8dc02cff07af9e0fa28adb2372337963 Oct 22, 2013

5 years agofix sequence related undefined behavior found by PVS Studio.
tsteven4 [Tue, 23 Mar 2021 18:40:06 +0000 (12:40 -0600)]
fix sequence related undefined behavior found by PVS Studio.

V567 The modification of the 's' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior.

5 years agopvs fix
tsteven4 [Tue, 23 Mar 2021 15:46:42 +0000 (09:46 -0600)]
pvs fix

V668 There is no sense in testing the 'wpt_tmp' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

5 years agofix another pvs warning
tsteven4 [Mon, 22 Mar 2021 17:53:18 +0000 (11:53 -0600)]
fix another pvs warning

V758 The 'pos' reference becomes invalid when temporary object returned by a function is destroyed.

5 years agofix ancient memory leak in filter_vecs. (#706)
tsteven4 [Sat, 20 Mar 2021 12:57:41 +0000 (06:57 -0600)]
fix ancient memory leak in filter_vecs. (#706)

5 years agoanother pvs studio find
tsteven4 [Fri, 19 Mar 2021 21:02:28 +0000 (15:02 -0600)]
another pvs studio find

↑ V547 Expression is always false.

5 years agoPVS Studio kills an old bug.
tsteven4 [Fri, 19 Mar 2021 14:53:45 +0000 (08:53 -0600)]
PVS Studio kills an old bug.

V1064 The '360' operand of integer division is less than the '65535' one. The result will always be zero.

Also, we need to set the flag for course.

5 years agomake some Qt containers const. (#705)
tsteven4 [Mon, 15 Mar 2021 20:32:54 +0000 (14:32 -0600)]
make some Qt containers const. (#705)

This avoids checks for detachment.

5 years agofix Qt6 deprecation warning in mapbar_track. (#703)
tsteven4 [Mon, 15 Mar 2021 13:04:10 +0000 (07:04 -0600)]
fix Qt6 deprecation warning in mapbar_track. (#703)

* fix Qt6 deprecation warning in mapbar_track.

"warning: 'fromUtf16' is deprecated: Use char16_t* overload."
However, it is recommended to use QString(const QChar *, int) or
QString(const QChar *) instead of
QString::fromUtf16(const ushort *unicode, int size = -1) and
QString::fromUtf16(const char16_t *str, int size = -1) anyway.

* fix Either the condition 'track==nullptr' is redundant or there is possible null pointer dereference.

as this isn't using a non-throwing allocation function memory allocation
errors will cause std::bad_alloc to be thrown anyway, we won't return
with track == nullptr.

* eliminate another non-functional memory check.

5 years agofix Wmissing-field-initializers. (#704)
tsteven4 [Mon, 15 Mar 2021 13:03:34 +0000 (07:03 -0600)]
fix Wmissing-field-initializers. (#704)

These appear with Qt6 on macos which enables Wextra.

5 years agouse default parameter instead of QString::KeepEmptyParts, (#702)
tsteven4 [Thu, 11 Mar 2021 20:44:35 +0000 (13:44 -0700)]
use default parameter instead of QString::KeepEmptyParts, (#702)

simplifying migration to Qt6.

5 years agoParse empty gx:coord elements in KML reader (#701)
Andreas Vögele [Mon, 8 Mar 2021 13:08:50 +0000 (14:08 +0100)]
Parse empty gx:coord elements in KML reader (#701)

Add test for empty gx:coord elements

5 years agomodernize nmea reader (#700)
tsteven4 [Thu, 4 Mar 2021 23:13:42 +0000 (16:13 -0700)]
modernize nmea reader (#700)

5 years agouse object tree to cleanup UpgradeCheck, UpgradeCheck::manager_ and (#692)
tsteven4 [Wed, 3 Mar 2021 20:35:49 +0000 (13:35 -0700)]
use object tree to cleanup UpgradeCheck, UpgradeCheck::manager_ and (#692)

UpgradeCheck::replyId.

5 years agoIntroduce RunMachine to manage gpsbabel process. (#699)
tsteven4 [Wed, 3 Mar 2021 16:53:39 +0000 (09:53 -0700)]
Introduce RunMachine to manage gpsbabel process. (#699)

* Introduce RunMachine to manage gpsbabel process.

* fix comment

* guard runmachine init state

5 years agofix gui usage of duplicate filter. (#695)
tsteven4 [Sun, 14 Feb 2021 20:36:57 +0000 (13:36 -0700)]
fix gui usage of duplicate filter. (#695)

the shortname and location options are not exclusive.

this resolves #686.

5 years agoremove a few old kludges that are no longer needed. (#691)
tsteven4 [Sat, 13 Feb 2021 16:09:58 +0000 (09:09 -0700)]
remove a few old kludges that are no longer needed. (#691)

* remove a few old kludges that are no longer needed.

* clean up upgrade a bit

"GPSBabel Version " doesn't need to be removed from currentVersionIn
in UpgradeCheck::checkForUpgrade,
that is taken care of in MainWindow::findBabelVersion

5 years agoupdate readme.md with current continuous integration provider (#672)
tsteven4 [Wed, 10 Feb 2021 19:54:26 +0000 (12:54 -0700)]
update readme.md with current continuous integration provider (#672)

* update README for new CI.

* use list for workflows

* appease codacy list item indent

* restore lost newline

* don't mention pre-releases in README.md

5 years agoremove leftover includes from autotools (#689)
tsteven4 [Wed, 10 Feb 2021 19:51:40 +0000 (12:51 -0700)]
remove leftover includes from autotools (#689)

* remove leftovers from autotools

we no longer have config.h, HAVE_CONFIG_H is always false.

* more config.h deletions (from jeeps)

5 years agomake src/core and jeeps includes relative to top cli directory (#688)
tsteven4 [Wed, 10 Feb 2021 19:26:28 +0000 (12:26 -0700)]
make src/core and jeeps includes relative to top cli directory (#688)

* make jeeps includes relative to cli diretory.

* make src/core includes all relative to top level src dir.

5 years agoprefer implicitly-defined dtors instead of user dtors with empty bodies. (#685)
tsteven4 [Sun, 7 Feb 2021 21:43:27 +0000 (14:43 -0700)]
prefer implicitly-defined dtors instead of user dtors with empty bodies. (#685)

Not only is this simpler, it avoids clang-tidy complaining about
warning: class * defines a non-default destructor but does not define a copy
constructor, a copy assignment operator, a move constructor or a move
assignment operator [cppcoreguidelines-special-member-functions]

5 years agocleanup FormatLoad class header file. (#684)
tsteven4 [Sat, 6 Feb 2021 21:29:11 +0000 (14:29 -0700)]
cleanup FormatLoad class header file. (#684)

clang-tidy modernize-use-default-member-init

This allows the use of the implicitly-defined default ctor.
Use implicitly-defined dtor as well.

5 years agofurther cleanups for Format class header. (#683)
tsteven4 [Sat, 6 Feb 2021 17:51:41 +0000 (10:51 -0700)]
further cleanups for Format class header. (#683)

manual fix for typedef found by clang-tidy modernize-use-using

clazy fixes for clazy-function-args-by-ref

clang-tidy fix for modernize-use-default-member-init

5 years agouse new style connect, i.e. function pointers (#682)
tsteven4 [Sat, 6 Feb 2021 13:55:00 +0000 (06:55 -0700)]
use new style connect, i.e. function pointers (#682)

* migrate from old style connects to the new style.

The changes using qOverload were done by hand, the rest were done
with clazy 1.9.

The ones using the TreeAction constructor were not found by clazy
and would require more manual intervention.

Also, I note uic generates old style connects.

* eliminate our TreeAction class in favor of QMenu::addAction method.

It is a mystery to me why we created TreeAction.  The QMenu method existed
in Qt 4.3.  Documentation before 4.3 is scarce.
QMenu::addAction(const QString &text, const QObject *receiver, const char *member, const QKeySequence &shortcut = 0)

* clazy updates gmapdlg connects.

* add TODOs for Qt6 related to qOverload.

5 years agodrop support for QtWebKit. (#680)
tsteven4 [Fri, 5 Feb 2021 17:01:41 +0000 (10:01 -0700)]
drop support for QtWebKit. (#680)

Our QtWebKit build didn't work any longer on Ubuntu bionic or focal,
but went into an infinite loop if map preview was used.
I observed this behavior with builds of 1.7.0 as well.

Document exisiting gui configuration option disable-mappreview.

I note that latest fedora build spec falls back to QtWebKit on some
architectures where QtWebEngine is not available.  This change will
require them to fall back to disabling the map preview instead.
https://src.fedoraproject.org/rpms/gpsbabel/blob/rawhide/f/gpsbabel.spec

QtWebEngine appears to be coming to Qt6 with or after 6.2.
https://bugreports.qt.io/browse/QTBUG-63235

5 years agodelete FAKE_LANGUAGE_MENU code. (#681)
tsteven4 [Fri, 5 Feb 2021 16:48:33 +0000 (09:48 -0700)]
delete FAKE_LANGUAGE_MENU code. (#681)

This code hadn't compiled for a while, and is no longer necessary
to test translations.

5 years agoreplace obsolete and overloaded QProcess signal error(QProcess::ProcessError error...
tsteven4 [Thu, 4 Feb 2021 22:56:38 +0000 (15:56 -0700)]
replace obsolete and overloaded QProcess signal error(QProcess::ProcessError error) (#679)

with the recommended replacement, QProcess signal errorOccurred(QProcess::ProcessError error).
It seems this should have caused an issue in Qt6, but we hadn't noticed it yet.

5 years agofix deprecated-copy waring. (#675)
tsteven4 [Tue, 2 Feb 2021 13:07:41 +0000 (06:07 -0700)]
fix deprecated-copy waring. (#675)

This fixes
"formatload.cc:127:40: warning: implicitly-declared
 â€˜Format& Format::operator=(const Format&)’ is deprecated [-Wdeprecated-copy]"

Use default member initializers for FormatOption and Format classes.
This allows the use of the default constructor and simplifies the
creation of parameterized constructors.

Use implicit copy constructor for FormatOption and Format classes.
Note the previous copy constructor for the Format class was not
really a copy constructor, it re-initialized readUseCount and writeUseCount.
This was unnecessary.  The only place we want to use the copy constructor is
in FormatLoad::getFormats and the instances to be copied have just been
created with one of the Format constructors so the use counts will be zero.
There are plenty of other opportunities where Qt might detach formatList_
and use the copy constructor.  Most of these cases are read accesses and
improved const correctness could eliminate the possiblity, i.e. using
QList::at instead of QList::operator[].  A few of these are modifying an
item on the formatList_, and Qt will insist the copy constructor is available
at compile time even if it is never used at run time.

5 years agorefactoring for cppcheck "The scope of the variable can be reduced" (#677)
tsteven4 [Mon, 1 Feb 2021 18:40:49 +0000 (11:40 -0700)]
refactoring for cppcheck "The scope of the variable can be reduced" (#677)

* refactoring for cppcheck "The scope of the variable can be reduced"

The c++17 "If Statement with Initializer" often are useful in resovling
these.

* more scope reduction.

* and another.

5 years agoMerge pull request #676 from tsteven4/moretidy
tsteven4 [Sun, 31 Jan 2021 19:40:07 +0000 (12:40 -0700)]
Merge pull request #676 from tsteven4/moretidy

clang tidy fixes

5 years agoqt6 compatibility changes. (#674)
tsteven4 [Sat, 30 Jan 2021 23:27:27 +0000 (16:27 -0700)]
qt6 compatibility changes. (#674)

QDateTime::toTime_t has been obsolete for a long time, it is gone
in Qt6.

5 years agotidy additional readability-convert-member-functions-to-static
tsteven4 [Sat, 30 Jan 2021 13:28:28 +0000 (06:28 -0700)]
tidy additional readability-convert-member-functions-to-static

5 years agotidy modernize-use-auto
tsteven4 [Fri, 29 Jan 2021 15:20:36 +0000 (08:20 -0700)]
tidy modernize-use-auto

5 years agotidy modernize-deprecated-headers
tsteven4 [Fri, 29 Jan 2021 14:51:20 +0000 (07:51 -0700)]
tidy modernize-deprecated-headers

5 years agoMerge pull request #673 from tsteven4/tidyupagain
tsteven4 [Thu, 28 Jan 2021 20:58:58 +0000 (13:58 -0700)]
Merge pull request #673 from tsteven4/tidyupagain

clang tidy readability fixes

5 years agotidy readability-qualified-auto
tsteven4 [Thu, 28 Jan 2021 18:08:14 +0000 (11:08 -0700)]
tidy readability-qualified-auto

I also ran these through astyle with our astylerc file to match
our standard.  This resulted in significant reformatting in geojson.cc

5 years agotidy readability-const-return-type
tsteven4 [Thu, 28 Jan 2021 16:18:37 +0000 (09:18 -0700)]
tidy readability-const-return-type

with a little whitespace cleanup by hand and removal of an
unused deprecated function.

5 years agotidy readability-convert-member-functions-to-static
tsteven4 [Thu, 28 Jan 2021 15:37:13 +0000 (08:37 -0700)]
tidy readability-convert-member-functions-to-static

this took a little bit of hand editing for whitespace and
one change that had to be reverted wrt a Functor signature.

5 years agotrust Qt to strip out characters illegal in xml. (#671)
tsteven4 [Wed, 27 Jan 2021 23:09:30 +0000 (16:09 -0700)]
trust Qt to strip out characters illegal in xml. (#671)

this was added in Qt 5.11.0.

5 years agoclang tidy readability-make-member-function-const
tsteven4 [Wed, 27 Jan 2021 19:18:06 +0000 (12:18 -0700)]
clang tidy readability-make-member-function-const

5 years agoUpdate standards to c++17, Qt >= 5.12, MSVC >= 2017 (#670)
tsteven4 [Wed, 27 Jan 2021 19:01:41 +0000 (12:01 -0700)]
Update standards to c++17, Qt >= 5.12, MSVC >= 2017 (#670)

* raise minimum standards to c++17, Qt 5.12, MSVC 2017.

* avoid std::optional::value which didn't work until macOS 10.14.

* avoid std::optional::value which didn't work until macOS 10.14.

* update runner for codeql so we have Qt >= 5.12

* try harder to get codeql working with newer Qt.

* use c++17 fallthrough attribute.

* use c++17 'if constexpr' as suggested by resharper.

* catch mkicondoc up with c++17

5 years agocleanup CMakeLists.txt a bit. (#669)
tsteven4 [Tue, 26 Jan 2021 18:55:59 +0000 (11:55 -0700)]
cleanup CMakeLists.txt a bit. (#669)

add support for cmake, ninja to Docker images.
get git to ignore various generated files.

5 years agofix some codeql warnings. (#663)
tsteven4 [Tue, 26 Jan 2021 17:58:32 +0000 (10:58 -0700)]
fix some codeql warnings. (#663)

* fix some codeql warnings.

* use c++11 z length modifier in format strings with size_t format arguments.

* don't attempt to upload coverage if token is null or not set.

with the github action flow the CODACY_PROJECT_TOKEN is set and null
for foreign pull requests that don't have access to the secrets.

* double protect token

5 years agoadd github actions for CI. (#662)
tsteven4 [Tue, 26 Jan 2021 13:42:40 +0000 (06:42 -0700)]
add github actions for CI. (#662)

* add github actions for CI.

* fix shellcheck issues in ci_install_windows.sh

* generalize windows ci build support

cleanup powershell scripts with Invoke-ScriptAnalyzer, including use of
"-Settings CodeFormatting".

create staging directory for windows installer creation.
It is difficult to exclude all the files in the build directory that we don't
want to distribute as the files are a function of the build system.

add windows cmake build.

5 years agocatch windows installer up with renamed vc redistributable installer. (#667)
tsteven4 [Sat, 23 Jan 2021 04:22:55 +0000 (21:22 -0700)]
catch windows installer up with renamed vc redistributable installer. (#667)

5 years agocatch cmake up (#666)
tsteven4 [Wed, 20 Jan 2021 16:51:45 +0000 (09:51 -0700)]
catch cmake up (#666)

with recent changes to *.pro files, and
some lost changes to get windows rc files working.

5 years agoRemove dead formats: alan, an1, netstumbler, naviguide.
Robert Lipe [Thu, 14 Jan 2021 07:01:24 +0000 (01:01 -0600)]
Remove dead formats: alan, an1, netstumbler, naviguide.

As discussed in https://github.com/gpsbabel/gpsbabel/issues/659

5 years agoMerge pull request #660 from gpsbabel/win64_only
tsteven4 [Thu, 31 Dec 2020 15:21:53 +0000 (08:21 -0700)]
Merge pull request #660 from gpsbabel/win64_only

switch windows release build from 32 bit to 64 bit (only).

5 years agoMerge pull request #658 from gpsbabel/date_demo
Robert Lipe [Wed, 30 Dec 2020 18:46:42 +0000 (12:46 -0600)]
Merge pull request #658 from gpsbabel/date_demo

Modernize time handling in compegps, globalsat, hiketech, jtr, magpro…

5 years agoMerge pull request #657 from gpsbabel/improve-errors
Robert Lipe [Tue, 29 Dec 2020 21:03:36 +0000 (15:03 -0600)]
Merge pull request #657 from gpsbabel/improve-errors

Improve errors by displaying full filename paths on open failures.

5 years agoturn off selected msvc warnings for c compiler.
tsteven4 [Tue, 29 Dec 2020 20:31:54 +0000 (13:31 -0700)]
turn off selected msvc warnings for c compiler.

5 years agoswitch windows release build from 32 bit to 64 bit (only).
tsteven4 [Tue, 29 Dec 2020 19:09:10 +0000 (12:09 -0700)]
switch windows release build from 32 bit to 64 bit (only).

5 years agoModernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.
Robert Lipe [Sun, 27 Dec 2020 09:13:10 +0000 (03:13 -0600)]
Modernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.

5 years agoUnfix warning in util.cc since it breaks builds
Robert Lipe [Sun, 27 Dec 2020 06:19:41 +0000 (00:19 -0600)]
Unfix warning in util.cc since it breaks builds

...on Windows and I don't feel like wrangling in an upgrade.

5 years agoFix a dumb warning in garmin_txt.cc.
Robert Lipe [Sun, 27 Dec 2020 05:23:27 +0000 (23:23 -0600)]
Fix a dumb warning in garmin_txt.cc.

5 years agoUse full path name when displaying errors opening files for reads and writes.
Robert Lipe [Sun, 27 Dec 2020 05:15:06 +0000 (23:15 -0600)]
Use full path name when displaying errors opening files for reads and writes.

This doesn't work for every place where we issue fatal errors, but it gets
the high value formats.

5 years agoMerge pull request #647 from gpsbabel/robertlipe-patch-1
tsteven4 [Mon, 21 Dec 2020 15:18:41 +0000 (08:18 -0700)]
Merge pull request #647 from gpsbabel/robertlipe-patch-1

ozi: don't deinit a write stream if we don't have one.

5 years agoadd ozi track write test cases
tsteven4 [Sun, 20 Dec 2020 19:46:01 +0000 (12:46 -0700)]
add ozi track write test cases

5 years agobackward compatible changes for Qt6 (#656)
tsteven4 [Tue, 15 Dec 2020 21:37:55 +0000 (14:37 -0700)]
backward compatible changes for Qt6 (#656)

* Avoid implicit conversion of int to QChar.

In Qt6 the constructor QChar(int code) is explicit by default.

* update codacy coverage reporter

* move coverage generation to focal.

* use binary codacy coverage reporter

5 years agomove Qt 5.15 build to 5.15.2. (#652)
tsteven4 [Fri, 20 Nov 2020 23:37:41 +0000 (16:37 -0700)]
move Qt 5.15 build to 5.15.2. (#652)

5 years agoupdate mac, linux docker qtio builds to 5.12.10. (#650)
tsteven4 [Tue, 10 Nov 2020 20:31:00 +0000 (13:31 -0700)]
update mac, linux docker qtio builds to 5.12.10. (#650)

* update mac Qt 5.12 build to 5.12.10.

* update qtio docker build to qt 5.12.10

5 years agofix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)
tsteven4 [Sun, 8 Nov 2020 17:51:41 +0000 (10:51 -0700)]
fix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)

5 years agoCreate codeql-analysis.yml (#648)
tsteven4 [Sun, 8 Nov 2020 16:26:23 +0000 (09:26 -0700)]
Create codeql-analysis.yml (#648)

* Create codeql-analysis.yml

* Update codeql-analysis.yml

5 years agoozi: don't deinit a write stream if we don't have one.
Robert Lipe [Tue, 27 Oct 2020 08:28:03 +0000 (03:28 -0500)]
ozi: don't deinit a write stream if we don't have one.

We can get into close() with a null stream_ TextStream. I think it has to do with ozi_openfile() reopening a file with a new name to match an extension of a certain type so it's renaming a file that hasn't been written. See issue #646

5 years agoupdate build to Qt 5.15.1 from 5.15.0 (#642)
tsteven4 [Thu, 10 Sep 2020 16:52:03 +0000 (10:52 -0600)]
update build to Qt 5.15.1 from 5.15.0 (#642)

5 years agoeliminate duplicate ignrando test. (#641)
tsteven4 [Tue, 8 Sep 2020 16:32:45 +0000 (10:32 -0600)]
eliminate duplicate ignrando test. (#641)

5 years agobackward compatible changes for Qt6. (#640)
tsteven4 [Sun, 30 Aug 2020 20:26:54 +0000 (14:26 -0600)]
backward compatible changes for Qt6. (#640)

* backward compatible changes for Qt6.

This is mostly QRegExp -> QRegularExpression.
Some QRegExp usage was was replaced by QString::trimmed.
There is also a QNetworkRequest redirect attribute change that is backward
compatible to Qt5.9.

* eliminate usage of unnecessary regular expressions.

* bring serial_unix into Qt6 compliance.

QSet::toList is gone, QSet::values is identical.
qSort is deprecated.

5 years agoadd ability to disable map preview in GUI (#635)
tsteven4 [Sat, 29 Aug 2020 19:37:14 +0000 (13:37 -0600)]
add ability to disable map preview in GUI (#635)

* add CONFIG option to disable map preview feature.

* additional excludes for disabled map preview

5 years agoFix potential segmentation faults with exif. (#639)
tsteven4 [Fri, 28 Aug 2020 11:50:07 +0000 (05:50 -0600)]
Fix potential segmentation faults with exif. (#639)

1. A pointer exif_app_ to an ExifApp on QList<ExifApp> exif_apps was saved.
After this the list was modified.  This can lead to the saved pointer becoming
invalid.
2. The ExifApp structure had a dtor, but no other special functions, i.e.  it
violated the rule of 3 and the rule of 5.  Operations on QList<ExifApp> may
cause an ExifApp on the list to be copied or destroyed.  If an ExifApp is
destroyed, then the ExifApp dtor would close the files, even though there could
be a copy of the ExifApp expecting the files still to be open.

This scenerio occured with Qt6, causing segmentation faults in exif.test.